package com.learn.egmvc1.demos.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class AddressController {
    //添加收货地址
    @RequestMapping("address/insert")
    @ResponseBody
    public String addAddress(String receiver,String address,String email,String mobile,String tag){
        System.out.println(receiver + address + email + mobile + tag);
        return "添加成功";
    }

    //查询收货地址
    @RequestMapping("address/select")
    @ResponseBody
    public String selectAddress(){
        return "查询成功";
    }

    //删除收货地址
    @RequestMapping("address/delete")
    @ResponseBody
    public String deleteAddress(String id){
        System.out.println(id);
        return "删除成功";
    }

    //修改收货地址
    @RequestMapping("/address/update")
    @ResponseBody
    public String updateAddress(String id,String receiver,String address,String email,String mobile,String tag){
        System.out.println(id + receiver + address + email + mobile + tag);
        return "修改成功";
    }
}
